package com.vanysoft.business.data.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.Valid;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 供应商集团邓白氏编码关联
 * </p>
 *
 * @author YangLei
 * @since 2018-07-16
 */
@TableName("BASE_DUNS_LINK")
public class DunsLink implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private String id;
    /**
     * 集团编码
     */
    @NotBlank(message = "{hint.notnull}")
    @Length(max = 30)
    private String ultimateCode;
    /**
     * 供应商编码
     */
    @NotBlank(message = "{hint.notnull}")
    @Length(max = 30)
    private String elementaryCode;
    /**
     * 是否启用（1启用 0不启用）
     */
    private String isEnable;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy/MM/dd")
    private Date modifyTime;
    /**
     * 创建人
     */
    private String createUser;
    /**
     * 修改人
     */
    private String modifyUser;

    @TableField(exist = false)
    private String modifyUserName;
    @TableField(exist = false)
    @Valid
    private DunsUltimate dunsUltimate;
    @TableField(exist = false)
    @Valid
    private DunsElementary dunsElementary;

    public String getModifyUserName() {
        return modifyUserName;
    }

    public void setModifyUserName(String modifyUserName) {
        this.modifyUserName = modifyUserName;
    }

    public DunsUltimate getDunsUltimate() {
        return dunsUltimate;
    }

    public void setDunsUltimate(DunsUltimate dunsUltimate) {
        this.dunsUltimate = dunsUltimate;
    }

    public DunsElementary getDunsElementary() {
        return dunsElementary;
    }

    public void setDunsElementary(DunsElementary dunsElementary) {
        this.dunsElementary = dunsElementary;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUltimateCode() {
        return ultimateCode;
    }

    public void setUltimateCode(String ultimateCode) {
        this.ultimateCode = ultimateCode;
    }

    public String getElementaryCode() {
        return elementaryCode;
    }

    public void setElementaryCode(String elementaryCode) {
        this.elementaryCode = elementaryCode;
    }

    public String getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(String isEnable) {
        this.isEnable = isEnable;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    @Override
    public String toString() {
        return "DunsLink{" +
                "id=" + id +
                ", ultimateCode=" + ultimateCode +
                ", elementaryCode=" + elementaryCode +
                ", isEnable=" + isEnable +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                ", createUser=" + createUser +
                ", modifyUser=" + modifyUser +
                "}";
    }
}
